@extends("/paging_template")
@import com.mgfireworks.mgplatform.mgadmin.user.model.Role
@args List<Role> roleList
<s_panel>
	<s_title slot="title">用户角色列表</s_title>
	<s_buttons slot="button" cols="4">
		<s_button type="query"></s_button>
		<s_button type="link" icon="fa-plus" href="@url("add.html")">添加</s_button>
		<s_button type="link" icon="fa-pencil" href="@url("edit.html?roleId={0}")">修改</s_button>
		<s_button type="del" href="@url("del.json?roleId={0}")">删除</s_button>
	</s_buttons>
</s_panel>

<d_table min-width="300px">
    <d_tr slot="head">
        <d_th class="td_row_id"></d_th>
        <d_th>角色编号</d_th>
        <d_th>角色名称</d_th>
    </d_tr>
    @if(roleList){
    @{int i=0;}
    @for(Role p : roleList){
    <d_tr slot="body" class="table_row @(i%2==0?"odd":"event")">
    @{i++;}
    <d_td class="td_row_id">
        <input type="checkbox" class="flat" name="__recordId" value="@p.getRoleId()"/>
    </d_td>
    <d_td>@p.getRoleId()</d_td>
    <d_td>@p.getRoleName()</d_td>
    </d_tr>
    }}
</d_table>